package cn.qfei.qiyuesuo.service.feishu;

import cn.qfei.qiyuesuo.bo.ApprovalExampleBo;

import java.io.File;
import java.util.List;
import java.util.Map;

/**
 * @Author chenlp
 * @Date 2023/8/7 10:17
 **/

public interface FeishuContractService {

    /**
     * 查看飞书合同详情
     * https://open.feishu.cn/open-apis/contract/v1/contracts/:contract_id
     *
     * @param contractId
     * @return
     */
    Map<String, Object> selectContractById(String contractId, String appId, String appSecret, String tenantAccessToken,String appKey,String appTicket);

    Map<String, Object> getFsProcessInstances(String fsAppId, String fsAppSecret, String processInstanceId);
    public int sendCardMessageToPeople(String fsAppId, String fsAppSecret, String receiveId, String msgType, String content,String receiveType);
    String uploadContractFile(String contractId, String appId, String appSecret, String fileType, File file, String fileName);

    int updateContract(String contractId, String fsAppId, String fsAppSecret, List<String> attachmentIds);

    int updateInstanceAssignee(String processInstanceId, String fsAppId, String fsAppSecret, String taskInstanceId, String assigneeIds);

    Map<String, Object> selectInstanceById(String instanceId, String fsAppId, String fsAppSecret);

    int tasksApprov(String approvalCode, String fsAppId, String fsAppSecret, String instanceCode, String fsFileId, String openId, String taskId, String form);

    File downloadFile( String appId, String appSecret,String fileId, String fileName);

    String uploadApprovalFile(String contractId, String fsAppId, String fsAppSecret, String attachment, File file, String fileName);
}
